import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBApplication.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/yb_chinese_text/yb_chinese_text.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBJsonToModel/YBMineModel/YBMineOrginzationManagerModel.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBModule/YBMineModule/YBMineProvider/YBMineUserProvider.dart';
import 'YBMineUserInfoZuZhiManagerinfoSubPage.dart';

class YBMineUserInfoZuZhiManagerInfoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
        appBar: AppBar(
          elevation: 0,
          title: Text(
            YBChineseText.mineMyQiYeTeamTitle,
          ),
        ),
        body: ChangeNotifierProvider(create:(context) => YBMineUserProvider()..getUserInfoData(),
          child: Consumer<YBMineUserProvider>(builder: (context,dataUserInfo,child){
            YBMineOrginzationManagerModel managermodel = dataUserInfo.mineUserInfoModel.orgList.first;
            return SingleChildScrollView(
              child: Column(
                children: [
                  Container(
                    child: InkWell(
                      child: Container(
                        height: YBTextStyle.adapterSize88,
                        color: YBColor.white,
                        child: Padding(
                          padding: EdgeInsets.only(left: YBTextStyle.adapterSize20,right: YBTextStyle.adapterSize20),
                          child: Container(
                            child: Row(
                              children: [
                                Container(
                                  child: Image.asset(YBImageStyle.getImagePath('mine_teamInfo')),
                                ),
                                Container(
                                  width: YBTextStyle.adapterSize12,
                                ),
                                Expanded(
                                  child: Column(
                                    mainAxisAlignment: MainAxisAlignment.center,
                                    crossAxisAlignment: CrossAxisAlignment.start,
                                    children: [
                                      Container(
                                        child: Text(
                                          managermodel.orgName??"",
                                          style: YBTextStyle.TextStyle2F303316Medium,
                                        ),
                                      ),
                                      Container(
                                        height: YBTextStyle.adapterSize15,
                                      ),
                                      Container(
                                        child: Text(
                                          managermodel.orgName != null?"${YBChineseText.mineMyTeamNameTitle}:${managermodel.manageName}":YBChineseText.mineMyTeamNameTitle,
                                          style: YBTextStyle.TextStyle90939912,
                                        ),
                                      ),
                                    ],
                                  ),
                                ),
                                Container(
                                  child: Text(
                                    YBChineseText.mineAuthTitle,
                                    style: YBTextStyle.TextStyleA9AEB812,
                                  ),
                                ),
                                Container(
                                  width: YBTextStyle.adapterSize5,
                                ),
                                Container(
                                  child: Image.asset(YBImageStyle.getImagePath('mine_orgianAuth')),
                                ),
                                Container(
                                  width: YBTextStyle.adapterSize8,
                                ),
                                Container(
                                  child: Image.asset(YBImageStyle.getImagePath('findIconArrowRight')),
                                )
                              ],
                            ),
                          ),
                        ),
                      ),
                      onTap: (){
                      },
                    ),
                  ),
                  Container(
                    child: InkWell(
                      child: YBMineUserInfoZuZhiManagerInfoSubPage(titleStr:YBChineseText.mineXingMingTitle,subTitleStr:dataUserInfo.mineUserInfoModel.customerName??"",),
                      onTap: () async {

                      },
                    ),
                  ),
                  Container(
                    child: InkWell(
                      child: YBMineUserInfoZuZhiManagerInfoSubPage(titleStr:YBChineseText.workTaiDianHuaTitle,subTitleStr:dataUserInfo.mineUserInfoModel.certLinkPhone??"",),
                      onTap: () async {
                      },
                    ),
                  ),
                  Container(
                    child: InkWell(
                      child: YBMineUserInfoZuZhiManagerInfoSubPage(titleStr:YBChineseText.mineWeChatHaoTitle,subTitleStr:dataUserInfo.mineUserInfoModel.wxNumber??"",),
                      onTap: () async {

                      },
                    ),
                  ),
                  Container(
                    child: InkWell(
                      child: YBMineUserInfoZuZhiManagerInfoSubPage(titleStr:YBChineseText.mineEmailTitle,subTitleStr:dataUserInfo.mineUserInfoModel.email??"",),
                      onTap: () async {

                      },
                    ),
                  ),
                  Container(
                    height: 8,
                  ),
                  Container(
                    child: InkWell(
                      child: YBMineUserInfoZuZhiManagerInfoSubPage(titleStr:YBChineseText.mineBuMenTitle,subTitleStr:""??"",),
                      onTap: () async {
                      },
                    ),
                  ),
                  Container(
                    child: InkWell(
                      child: YBMineUserInfoZuZhiManagerInfoSubPage(titleStr:YBChineseText.mineziWeiTitle,subTitleStr:""??"",),
                      onTap: () async {

                      },
                    ),
                  ),
                  Container(
                    height: YBTextStyle.adapterSize20,
                  ),
                ],
              ),
            );
          }),
        ),
      ),
    );
  }
}
